package com.htgd.gardenexpo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author: 王秀田
 * @date: 2024/11/14 15:19
 * @description: 积分商品订单表
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ge_con_integral_goods_order")
@ApiModel(value="GeConIntegralGoodsOrder对象", description="积分商品订单表")
public class GeConIntegralGoodsOrder implements Serializable {

    private static final long serialVersionUID = -4572426404473396927L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "openId")
    private String openId;

    @ApiModelProperty(value = "订单编号")
    private String orderNum;

    @ApiModelProperty(value = "收件人")
    private String name;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "所在地区")
    private String region;

    @ApiModelProperty(value = "详细地址")
    private String detail;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品图片")
    private String picture;

    @ApiModelProperty(value = "商品图片")
    @TableField(exist = false)
    private List<String> images;

    @ApiModelProperty(value = "商品类型")
    private String type;

    @ApiModelProperty(value = "商品类型文本")
    @TableField(exist = false)
    private String typeText;

    @ApiModelProperty(value = "购买商品数量")
    private Integer num;

    @ApiModelProperty(value = "需兑换商品积分")
    private Integer integral;

    @ApiModelProperty(value = "商品详情")
    private String details;

    @ApiModelProperty(value = "消费总积分")
    private Integer totalIntegral;

    @ApiModelProperty(value = "商品ID")
    private String goodsId;

    @ApiModelProperty(value = "地址ID")
    private Integer addressId;

    @ApiModelProperty(value = "状态（'0':成功，'1':失败）")
    private String status;

    @ApiModelProperty(value = "兑换时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "备注")
    private String remark;
}
